package com.ext.aic.adapter;

import com.bigkoo.pickerview.view.WheelOptions;
import com.bigkoo.wheelview.adapter.WheelAdapter;
import com.ext.aic.beans.PeriodOptionItem;

import java.util.List;

public class PeriodOfHostingAdapter implements WheelAdapter<PeriodOptionItem> {

    private List<PeriodOptionItem> items;

    public PeriodOfHostingAdapter(List<PeriodOptionItem> items) {
        this.items = items;
    }

    @Override
    public int getItemsCount() {
        return items.size();
    }

    @Override
    public PeriodOptionItem getItem(int position) {
        return items.get(position);
    }

    @Override
    public int indexOf(PeriodOptionItem periodOptionItem) {
        return items.indexOf(periodOptionItem);
    }
}
